[js] Adding a check for the facebook SDK before trying to re-parse the markup on single photo loads