Fixed DIM not defined error when building with double precision.