parent option is not passed to custom-dialog when using dialog

When using the dialog funciton to create a dialog, the :parent option is ignored and not passed to custom-dialog, so that the position of the displayed dialog does not take the position of the parent frame into account. The attached commit fixes this behaviour.