Windows/OS X cross builds, a few more fixes

Just a few more fixes to consider, while doing cross builds: https://github.com/NixOS/nixpkgs/pull/1928