fix building to separate output dir (arg O=)

inspired by https://github.com/CyanogenMod/android_kernel_samsung_exynos5410/commit/0d6f68f5a6b9c2ce272f2da43019c318566472e4