Fix initialization order of MANTIDLIBS cmake variable.

If MPI is enabled then this ensures the Boost_LIBRARIES variable is
captured before it is overwritten.
Refs #10632
Merge branch 'bugfix/10632_fix_clean_mpi_build' into develop