fix ambiguous conversion errors for gcc 4.8

Change-Id: Id76400ff9fef750b598c2b99268e890e7aba12e9