Add registerPlugin API method.