Updated buildConfig in PopupManager to copy config

Before, custom configuration options were lost. This change makes custom options pass through. Added to support the closeButton configuration option that I added in my previous commit.