Now is hasPermanentMenuKey()! And fix the build

(cherry picked from commit 9b9c54ad238f4b0bb3a28eed5d1b5bc135294654)