Fixed build errors when target version <7.0