Fixed linking on MinGW.