fix build script, and fix mutex import