fix gcc4.7 and cross