fixes for different C versions