make canvas an optional dependency