Ensure plugin uses store passed into options

Plugin was assuming store was in the window namespace. Now it will reliably use the store passed into options.