Fix building errors on x86_64-w64-mingw32 due to wrong linking order.
Merge pull request #234 from hauzer/master

Building of example fails on x86_64-w64-mingw32 with unresolved references due to wrong linking order