Add new constructor of specifying a serializer.