Update the ordering of preferred libraries that provide crypto functions.
Partially revert commit 58dc42aaea93cd281aafaaaa4c3926c3578b7e26 as this broke mingw builds.
Correct ordering of preferred library for crypto function in mingw builds.