Improved old commands to work with tikz-externalize