getcwd-lgpl: fix m4 to match relaxed test for BSD