Fix `pwd' not found problem when building on windows

Tested building on CentOS 6.5 and Win8.