Moved a constructor definition out of the class declaration because some compiler versions complain the lamba is an undefined reference.