Support for newer version of Facebook button, and fixed race condition.