added missing BASE_DIR to platform selection code