Fix compilation problems on older platfomrs