Patch navbar for modernizr support

Currently the navbar modules uses a convoluted method of working with
modernizr library. This patch allow modernizr module to work with navbar
to simplify the process.