Adding OSGi support

Added OSGi support to be able to use this project as a bundle in our project.