fixes for npm config proxy

- ensure noop when proxy is default (undef instead of empty string)
- fix the require package to be compatible with all OSes