Fix use platform.mk to detect extension platform