adding compatibility library
few modification to revert changes from android studio and keeping compatibility with eclipse