Initial version from logari81 after fixing compile errors.
Tested with Eigen 5599:705214450889 from mercurial (https://bitbucket.org/eigen/eigen/)
Set some compile options