fixed build with engine lib; fixed iPhone detection