Move -lgdi32 after -lcrypto (fixes #681).