fix extern prefix detection when cross compiling.