Fixes for gcc 4.8/4.9

Change-Id: I498ab5fd5ef97b21e365dbcac6110eabaec5d289