Fix linking under mingw. Native functions not exported into dll correctly