A couple of fixes for cygwin/gcc

- Enable out of source build
- Add missing dependency of libcrypto on libz