Various non-libphysfs compilation fixes