[Locator] Fixed building errors on GCC 4.6.