Updated buildscript to not cause a dynamic variable declaration being deprecated warning.