diff --git a/src/ppx_deriving_yojson.ml b/src/ppx_deriving_yojson.ml
index 4b9be28..1a611c9 100644
--- a/src/ppx_deriving_yojson.ml
+++ b/src/ppx_deriving_yojson.ml
@@ -300,6 +300,11 @@ and desu_expr_of_only_typ ~path typ =
     raise_errorf ~loc:ptyp_loc "%s cannot be derived for %s"
                  deriver (Ppx_deriving.string_of_core_type typ)
 
+(* TODO: Do not wrap runtime around [@default ...].
+   We do currently and for instance the following doesn't currently work:
+   module List = struct let x = [1; 2] end
+   type t = {field : int list [@default List.x]} [@@deriving to_yojson]
+*)
 let wrap_runtime decls =
   Ppx_deriving.sanitize ~module_:(Lident "Ppx_deriving_yojson_runtime") decls
 
@@ -321,7 +326,7 @@ let ser_str_of_record ~loc varname labels =
       | None ->
           [%expr [%e result] :: fields]
       | Some default ->
-          [%expr if Pervasives.(=) [%e field] [%e default] then fields else [%e result] :: fields])
+          [%expr if [%e field] = [%e default] then fields else [%e result] :: fields])
   in
   let assoc =
     List.fold_left
diff --git a/src/ppx_deriving_yojson_runtime.mli b/src/ppx_deriving_yojson_runtime.mli
index dacb5fc..f4c7674 100644
--- a/src/ppx_deriving_yojson_runtime.mli
+++ b/src/ppx_deriving_yojson_runtime.mli
@@ -1,5 +1,3 @@
-include module type of Ppx_deriving_runtime
-
 type 'a error_or = ('a, string) Result.result
 
 val ( >>= ) : 'a error_or -> ('a -> 'b error_or) -> 'b error_or
@@ -10,3 +8,17 @@ val map_bind : ('a -> 'b error_or) -> 'b list -> 'a list -> 'b list error_or
     computes it tail-recursively so that large list lengths don't
     cause a stack overflow *)
 val safe_map : ('a -> 'b) -> 'a list -> 'b list
+
+val ( = ) : 'a -> 'a -> bool (* NOTE: Used for [@default ...] *)
+module List : (module type of List)
+module String : (module type of String)
+module Bytes : (module type of Bytes)
+module Int32 : (module type of Int32)
+module Int64 : (module type of Int64)
+module Nativeint : (module type of Nativeint)
+module Array : (module type of Array)
+module Result : sig
+  type ('a, 'b) result = ('a, 'b) Result.result =
+    | Ok of 'a
+    | Error of 'b
+end
diff --git a/src_test/test_ppx_yojson.ml b/src_test/test_ppx_yojson.ml
index 635c7da..4849db2 100644
--- a/src_test/test_ppx_yojson.ml
+++ b/src_test/test_ppx_yojson.ml
@@ -505,16 +505,34 @@ let test_int_redefined ctxt =
   let expected = `Int 1 in
   assert_equal ~ctxt ~printer:show_json expected M.x
 
+(* TODO: Make this work *)
+(*
+let test_list_redefined ctxt =
+  let module M = struct
+    type redef_list =
+      | []
+      | (::) of int * int
+
+    type t = {field : int list} [@@deriving to_yojson]
+    let x = {field = List.([1;2])}
+  end
+  in
+  let expected = `List [`Int 1; `Int 2] in
+  assert_equal ~ctxt ~printer:show_json expected M.x
+*)
+
 let test_equality_redefined ctxt =
   let module M = struct
     module Pervasives = struct
       let (=) : int -> int -> bool = fun a b -> a = b
       let _ = 1 = 1 (* just dummy usage of `=` to suppress compiler warning *)
+
+      let never_gonna_be_in_pervasives = None
     end
     let (=) : int -> int -> bool = fun a b -> a = b
     let _ = 1 = 1 (* just dummy usage of `=` to suppress compiler warning *)
 
-    type t = {field : int option [@default None]} [@@deriving to_yojson]
+    type t = {field : int option [@default Pervasives.never_gonna_be_in_pervasives]} [@@deriving to_yojson]
     let x = {field = Some 42}
   end
   in