javascript: implement %lib directive for node