Add externs to support optimized builds