Fix static import compile bug. Fix buildscript on non-CI environments.