Add conditional branch to call 'system' depending on platform