Move hackery into the buildutils library to allow extension later on