fix build system and configuration