Get rid of deprecation warnings for OpenSSL on OSX 10.7+
Fix kqueue support.