fix extern prefix detection on mingw