Fixing some autotools bugs on older versions