Changed build for ROOT-6 compatibility