Tweaks to get things easier to compile outside of CJ