fix ambiguous conversion errors for gcc 4.8

Change-Id: Ifa1a4073a805485a38344a7170ce381e6f0bbbd9