add OSGi support
Merge pull request #25 from hlavki/master

Add OSGi support.