adding the ability to modify navigation

This will allow engines and other initialization code
to modify the navigation.
(cherry picked from commit 5716a444bb6a6ad3714af150278299f1a937d936)
Merge pull request #4 from jlsherrill/experimental-menu3

adding the ability to modify navigation