Make migration.php execute SQL patches using a system call. Fixes #378.