mkmf refactoring