Fixed extern compile (static) on linux and removed Clucene dependency