Passes check --as-cran and windows tests

Also fine in mac xquartz