fix build in funky environments