Fix Windows Building

* Make examples and tests link correctly
* Fix OpenSSL detection failure when cross-compiling
Merge pull request #119 from LinuxJedi/fix-mingw

Fix Windows Building