This reverts commit 6eae62b008.
This reverts commit baa1f6250e.
Leaves in the removal of -w from the darwin LDFLAGS as it is still
problematic on 1.9.5 and 1.10.1.
cgo starts exiting when pkg-config doesn't work, so limit calling
pkg-config to linux and windows.
we also need to specify -lssl and -lcrypto in the linker flags
when we don't have pkg-config