A bit more robust osgi parsing.