Fixes #2213 - improves compatibility when jquery-ui stylesheet is included