Source compiles but does not link under MinGW