make compatible with nodejs server-side rendering