Update syntax check to GroovyShell

Changed the syntax check from Compile.compile() to GroovyShell.parse()

Since I'm unable to replicate the problem I'm not sure if this will solve the problem mentioned in the last commit: https://github.com/jenkinsci/build-flow-plugin/commit/1b43f2542bd2d65ba92f56d6a2079fb02d3a7d4c#commitcomment-4020431