Fixes PDO serialization behavior when storing assign in session