clearer waiting for loading libs
work with more recent jQuery
refs intermine/intermine#363