Use postMessage when available