Small tweaks to rake build to get defines working properly