Update compile to detect OSGi