fix the build so that it can work on 1.5 and 1.6