make makefiles compatible with CyanogenMod 10

Change-Id: I4781813bc9d87bd2a5ea296cbe2a6c8b6ba96643