Fix menuComponent test to work with PhantomJS (thanks @andreit).