Update theme compat to return instead of echoing output.

This is to mirror recent changes in theme compat.