Not sure how important your requirement to exclude is?
Did you find a way to dynamically include in index.html anyway? Some sort of script logic?
Detection of ios or android could possibly be done by testing existence of cordova related objects (after load of cordova.js)