getcwd: fix compile error in configure check