KitKat Updates

Fixes to allow building under KitKat