Revert "Speed up menu generation by using an array (#116)"

This reverts commit fac7635c874c86d3c2b3086714e2e771b7873565, seems
that it breaks in older browsers (*cough* IE)