Add kwargs support for memoize