add MarginZero as an external variable
fix platform compile error